#ifndef __GLOBAL__
#define __GLOBAL__


#include <stdio.h>
#include <stdlib.h>
#include <malloc.h>
#include <string.h>
#include <math.h>
#define MAXINPUT 32000
#define MAXOUTPUT 32000
#define MAXCHARALINE 600
#define HASHSIZE 256
#define MAXTABLESIZE 32000

#define ISFUNC 4
#define ISTOKEN 3
#define ISLP 2
#define ISRP 1
#define ISNULL 0

typedef struct{
  char* r; //in  栈
  char* w; //out 栈
  char* t; //tmp 栈
  int   Q; //引用次数
  int   tag; //类型
} At;

//函数声明
//in the SymTable.c
void pushSymb(char* name,char* val);
char findSymb(At a);
void pushTable();
void popTable(char *endTable=NULL);

//in the Token.c
At putToken(At a);
At getToken(At a);
char* getNextPos(char* p,char* np=NULL);

//in the eval.c
At Eval(At a,int wdg=0,int wdgRP=0);

//in the func.c
At func(At a,int wdg=0,int wdgRP=0);

//in the shell.c
void shell(char* command,char* writeAt,char** writeOverAt);
#endif
